1. Field of the Invention
The present invention relates generally to a method for speeding up JPEG quantization operations in image compression, and in particular to an improvement on the quantization table for reducing the time for quantization operations.
2. Description of the Prior Art
JPEG is an abbreviation form of the organization named Joint Photographic Experts Group. The purpose of this organization is to develop a compression standard for multicolour/black-and-white images from the natural scenery and true world. The compression standard developed is named after this organization, JPEG.
The greatest bottleneck for JPEG compression operations is the mass division operations during quantization. The division operations consume lots of time. Therefore, the application fields for JPEG are quite limited. In traditional applications, for abbreviating operation time, a highly-priced high speed operation processor is necessary. Alternatively, extra hardware circuits are necessary to maintain image quality. And, either way will cause an increase in cost. Therefore, a new algorithm is necessary to replace division operations so that the operation time can be reduced.
JPEG discloses several compression modes for static image. The most commonly utilized is the baseline mode wherein an encoder is utilized to perform some steps to accomplish compression. Referring to FIG. 1, the flow chart of a compression algorithm for baseline mode is illustrated.
Through image conversion 432, three primary colours, red R, green G and blue B are linearly converted to a luminance component Y and two chrominance components C.sub.b and C.sub.r by matrix operations. Y represents the grayscale component for original image and C.sub.b and C.sub.r comprise the colour components for converting grayscale images to multicolour images.
The sampling points is then lessened 434. For speeding up the succeeding compression operations, several C.sub.b and C.sub.r sampling points are then fetched to derive an average value. The average value is then utilized to replace the foregoing several sampling points. Therefore the size for C.sub.b and C.sub.r is reduced since that the human eyes are more sensative to luminance than chrominance.
The block dividing 436 is then performed. The three components Y, C.sub.b and C.sub.r are all divided to blocks each composed by sixty-four (derived by eight multiplying eight) sampling points since that compression processing is performed by block.
The values in each block are of an unsigned number form. It is necessary to convert the unsigned number form to a signed number form. Such an operation is called level shift 438.
Then, through the operations and processing of a discrete cosine transform encoder module 440, a descriptor can be derived for each sampling point in a block. The description for such an operation will be detailedly described referring to FIG. 2 below.
Then, data is input to JPEG disorder encoder 442. The descriptors derived are utilized to generate a set of codes through Huffman encoding table 444. This set of codes are followed by the discrete cosine transform coefficients derived from quantized sampling points to accomplish encoding. After encoding each block, the front is affixed with a header and the end is affixed with a trailer. Therefore, the whole compression procedure is thus performed.
Referring to FIG. 2, a flow chart for a discrete cosine transform encoder module is illustrated. The flow chart illustrates that a level shifted block is converted to a descriptor through the module.
The level shifted block is then input to a discrete cosine transform encoder module 440. The discrete cosine transform coefficient S.sub.vu is derived through forward discrete cosine transform 224 first. The conversion formula for the forward discrete cosine transform 224 is ##EQU1## wherein S.sub.yx is a sampling point in a block, x=0.about.7, y=0.about.7, and,
S.sub.vu is a sampling point derived in a discrete cosine transformed block, v=0.about.7, u=0.about.7, ##EQU2##
After quantization processing 226, the discrete cosine transform coefficient quantized is derived. The quantized discrete cosine transform coefficient is divided to a direct current DC component and alternate current AC components. The difference between the direct current component of this block and the direct current component of the precedent block, DIFF, is the corresponding descriptor of the direct current component. The substractor 232 is utilized to perform the subtraction for obtaining the difference DIFF. The upperleft part of each block is a DC component, and the other sixty-three values are AC components
Referrring to FIG. 3, a well-known quantization method is illustrated. The matrix composed by discrete cosine transform coefficients is divided by the original quantization table. And, the matrix composed by quantized discrete cosine transform coefficients is derived.